CC       := g++
CFLAGS   := -c -g
RM       := rm -f

main: nodos estructuras heuristicas algoritmos mp
	$(CC) -o main main.o IDA.o A.o Manhattan15Puzzle.o PDBHeuristic.o BinaryHeap.o  OpenList.o FifteenPuzzleNodeA.o FifteenPuzzleNodeIDA.o

nodos: datastructures/FifteenPuzzleNodeA.cpp datastructures/FifteenPuzzleNodeIDA.cpp
	$(CC) $(CFLAGS) datastructures/FifteenPuzzleNodeA.cpp datastructures/FifteenPuzzleNodeIDA.cpp

estructuras: datastructures/BinaryHeap.cpp datastructures/OpenList.cpp
	$(CC) $(CFLAGS) datastructures/BinaryHeap.cpp datastructures/OpenList.cpp

heuristicas: heuristics/Manhattan15Puzzle.cpp heuristics/PDBHeuristic.cpp
	$(CC) $(CFLAGS) heuristics/Manhattan15Puzzle.cpp heuristics/PDBHeuristic.cpp

algoritmos:  IDA/IDA.cpp A/A.cpp
	$(CC) $(CFLAGS) IDA/IDA.cpp A/A.cpp

mp: main.cpp
	$(CC) $(CFLAGS) main.cpp

clean:
	$(RM) *.o main

all: main
